// declaracion de variables usadas por todo el programa

CONST

	// Pantalla
	RES_X = 320;
	RES_Y = 240;

	// Tiles
	TILE_SIZE = 32;

	// secciones del programa
	INTRO = 1;
	MENU = 2;
	JUEGO = 5;

END

GLOBAL

	int modo_debug = true;
	
	int modo_editor = false;
	int editor_durezas = false;
	
	// datos del scroll tileado
	STRUCT ts
		int dibujar = true;
		int x;								// posicion 0,0 del scroll en pantalla
		int y;
		int width = RES_X;		// ancho y alto del scroll en pantalla
		int height = RES_Y;
		int offset_x;				// posicion a la que se tiene que mover
		int offset_y;
		int speed = 4;				// velocidad del movimiento
		int fpg;							// grafico del scroll
	END
	
	// datos del cursor
	STRUCT tsCursor
		int tx;
		int ty;
	END
	
	STRUCT mapa
		//info del mapa
		ancho = 25;
		alto = 20;
		
		// mapa de tiles
		int tiles[]=
		09, 08, 08, 03, 08, 02, 08, 02, 08, 09, 01, 09, 02, 08, 09, 01, 09, 01, 09, 02, 09, 01, 09, 01, 09,
		08, 01, 02, 01, 02, 03, 01, 01, 02, 01, 01, 02, 01, 02, 01, 01, 02, 01, 02, 01, 01, 01, 01, 02, 01,
		02, 02, 01, 03, 01, 02, 01, 02, 01, 03, 02, 02, 02, 01, 03, 02, 02, 01, 01, 02, 01, 01, 01, 01, 01,
		01, 01, 02, 01, 02, 03, 01, 01, 02, 01, 01, 02, 01, 02, 01, 01, 02, 01, 02, 01, 01, 01, 01, 02, 01,
		02, 02, 01, 03, 01, 02, 01, 01, 01, 03, 02, 02, 02, 01, 03, 02, 02, 01, 01, 02, 01, 01, 01, 01, 01,
		03, 02, 01, 02, 01, 02, 01, 01, 01, 03, 01, 02, 02, 01, 03, 01, 02, 01, 01, 02, 01, 01, 01, 01, 01,
		02, 02, 01, 03, 01, 02, 01, 01, 01, 03, 02, 02, 02, 01, 03, 02, 02, 01, 01, 02, 01, 01, 01, 01, 01,
		01, 01, 02, 01, 02, 03, 01, 01, 02, 01, 01, 02, 01, 02, 01, 01, 02, 01, 02, 01, 01, 01, 01, 02, 01,
		03, 02, 01, 02, 01, 02, 01, 01, 01, 03, 01, 01, 03, 01, 03, 01, 02, 01, 01, 02, 01, 01, 01, 01, 01,
		02, 02, 01, 03, 01, 02, 01, 01, 01, 03, 07, 05, 07, 01, 03, 02, 02, 01, 01, 02, 01, 01, 01, 01, 01,
		01, 01, 02, 01, 02, 03, 01, 01, 02, 01, 07, 06, 07, 02, 01, 01, 02, 01, 02, 01, 01, 01, 01, 02, 01,
		01, 02, 01, 03, 01, 02, 01, 01, 01, 03, 07, 07, 07, 01, 03, 01, 02, 01, 01, 02, 01, 09, 01, 01, 01,
		01, 01, 01, 01, 02, 01, 01, 01, 02, 01, 03, 02, 01, 02, 01, 03, 02, 01, 08, 01, 01, 01, 01, 02, 01,
		01, 01, 02, 01, 02, 04, 01, 01, 02, 01, 01, 02, 01, 02, 01, 01, 02, 01, 02, 01, 01, 01, 01, 02, 01,
		03, 02, 01, 02, 01, 02, 01, 02, 01, 03, 01, 02, 02, 01, 03, 01, 02, 01, 01, 02, 01, 01, 01, 01, 01,
		02, 01, 02, 01, 03, 01, 01, 01, 02, 01, 01, 02, 01, 02, 01, 01, 02, 01, 02, 01, 01, 01, 01, 02, 01,
		01, 02, 01, 03, 01, 02, 01, 02, 01, 03, 01, 02, 02, 01, 03, 01, 02, 01, 01, 02, 01, 09, 01, 01, 01,
		01, 01, 01, 01, 02, 01, 01, 01, 02, 01, 03, 02, 01, 02, 01, 03, 02, 01, 08, 01, 01, 01, 01, 02, 01,
		01, 02, 01, 02, 01, 02, 01, 02, 01, 03, 01, 02, 02, 01, 03, 01, 02, 01, 01, 02, 01, 01, 01, 01, 08,
		01, 01, 02, 01, 02, 01, 01, 01, 02, 01, 01, 02, 01, 02, 01, 01, 02, 01, 02, 01, 01, 01, 01, 08, 09;
		
		int durezas[]=
		00, 01, 00, 01, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
		00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00;
		
	END
	
	// Secciones del juego
	seccion = JUEGO;
	seccion_cambio = true;
	
	
	// FPGs
	menu_fpg;
	unidades_fpg;
	
	fpg_sistema;

END
